Skip to content

test(libSceIcu): include initializer_list where the tests build lists - #28849

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
NobleBrains:test/icu-include-initializer-list
Dec 4, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
NobleBrains:test/icu-include-initializer-list

Conversation

@NobleBrains

@NobleBrains NobleBrains commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Char16PtrStringPieceInline.cpp and GuestIcuArrayComparators.cpp build std::initializer_list values through range-for loops over braced lists but do not include <initializer_list>. With libc++ on macOS neither test compiles ("cannot deduce type of initializer list because std::initializer_list was not found"). Each file now includes the header. No behaviour changes.

Tested

On macOS 15.7.9 (Apple M4, x86_64 Release build under Rosetta 2, Apple clang with libc++), main e8f09d2877 plus the open macOS build fixes #27201, #27767, #27739 and #27843 without this change: both test files failed to compile, 15 errors in the first and one in the second. With this change both build, and ctest -R "guest_icu_char16ptr_string_piece_inline|guest_icu_array_comparators" passes 2 of 2.

Not run: Linux and Windows builds; the include is standard and adds no dependency.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated test-file includes to support initializer-list usage.
    • These changes are limited to test code and do not alter application behavior or public functionality.

libc++ on macOS does not pull the header in through the other includes, so
Char16PtrStringPieceInline.cpp and GuestIcuArrayComparators.cpp did not compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Test include updates

Layer / File(s) Summary
Add initializer_list includes
core/libs/prx/libSceIcu/tests/Char16PtrStringPieceInline.cpp, core/libs/tests/GuestIcuArrayComparators.cpp
Both test files include the standard <initializer_list> header.

Possibly related PRs

Suggested reviewers: marczx10

Change: Other

Merge Risk: Minimal · up to a6c5f

This change adds a missing standard header to two test files so they compile on macOS. It does not change runtime behavior, and no merge-blocking risk remains.

Architecture risk: Low · up to a6c5f

The test translation units now declare their initializer-list compile dependency explicitly, without changing runtime behavior or public contracts.

Changed areas: core

Review details

Systems and components

  • observed — 2 changed files mapped to core.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b4afa37-21fe-4840-a757-09092a154d5c
Commits

Reviewing files that changed from the base of the PR and between 9f5dbf0 and a6c5f73.

Files selected for processing: 2

  • core/libs/prx/libSceIcu/tests/Char16PtrStringPieceInline.cpp
  • core/libs/tests/GuestIcuArrayComparators.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head a6c5f73ad83b94846267f4cb11eec1ba13b93e13, including the prepared diff and the complete contents of both changed files. No tests or builds were run. The repo_read.py attempt returned source output, then reported that it could not append its read log in the read-only workspace.

sed -n '1,150p' files/core/libs/tests/GuestIcuArrayComparators.cpp
sed -n '180,250p' files/core/libs/prx/libSceIcu/tests/Char16PtrStringPieceInline.cpp

Results

Check Result Note
Diff and changed files passed Both changed files read
Tests and builds not run Author reports macOS test results

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • The author-reported macOS build and test results were not independently run.
  • Linux and Windows builds were not run.
  • Files reviewed: core/libs/prx/libSceIcu/tests/Char16PtrStringPieceInline.cpp and core/libs/tests/GuestIcuArrayComparators.cpp. files.json lists no excluded files.

To get this to a good state

No follow-up required.

@JJenkx

JJenkx commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

I reproduced the compile failures on x86-64 Arch Linux with Clang and libc++ 23.1.5. I compiled the two exact translation units to objects in C++23 mode, using their repository headers from the same revisions.

  • Parent e5edef8874725: both files failed with the missing std::initializer_list diagnostic (15 sites in Char16PtrStringPieceInline.cpp, one in GuestIcuArrayComparators.cpp).
  • Head a6c5f73ad83b: both files compiled with libc++. GCC 16.2.1 with libstdc++ compiled both revisions and produced byte-identical object files for each test.

This check covers compilation of the two changed sources. Test execution was covered by the macOS run in the PR description.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 5bc8c18 into boykopovar:main Dec 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants